package com.cinyi.cyds.base.redis;

/**
 * @author penghui
 *
 */
public class RedisServiceImpl implements IRedisService {
	private RedisHelper redis = null ;
	
	public RedisServiceImpl(){
		this.redis = RedisManager.getInstance().getRedisHelper();
	}
	
	public void save(String key,java.io.Serializable value) {
		redis.set(key, value.toString());
	}

	public synchronized String read(String key) {
		try{
			return redis.get(key);
		}catch(Exception ex){
		}
		
		return null;
	}

	public void delete(String key) {
		redis.del(key);
	}
	
}
